﻿using System.Data;

namespace TurtleEngine
{
	 /// <summary>
	 ///
	 /// </summary>
	 public class UserDefinedTypesHelper
	 {
		  /// <summary>
		  /// The user defined types
		  /// </summary>
		  private static DataTable userDefinedTypes = new DataTable("UserDefinedTypes");

		  /// <summary>
		  /// Gets the user defined types.
		  /// </summary>
		  /// <value>
		  /// The user defined types.
		  /// </value>
		  public static DataTable UserDefinedTypes
		  {
				get { return userDefinedTypes; }
		  }

		  /// <summary>
		  /// Gets the user defined types.
		  /// </summary>
		  public static void GetUserDefinedTypes()
		  {
				userDefinedTypes.Clear();
				userDefinedTypes = Utility.DBConnection.GetSchema("UserDefinedTypes");

				//Utility.PrintDatatable(userDefinedTypes);
				Utility.WriteXML(userDefinedTypes, userDefinedTypes.TableName + ".xml");
		  }
	 }
}